package run.halo.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * Halo main class.
 *
 * @author ryanwang
 * @date 2017-11-14
 */

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        // Customize the spring config location
        //TODO:LYF 补充配置 additional-location，jre的环境变量,
        // https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config
        System.setProperty("spring.config.additional-location",
            "optional:file:${user.home}/.halo/,optional:file:${user.home}/halo-dev/");
        // Run application
        SpringApplication.run(Application.class, args);
        //TODO  LYF  controller -> Model/Service ->Repository
        //TODO                             /CacheStore/EventPublisher
        // find . -name '*.java' | xargs cat | egrep 'public (class|interface).*(extends|implements)'
        // find . -name '*.java' | xargs cat |
        // awk -vRS='{' 'match($0,/public\s+((class|interface).+(extends|implements).+$)/,a){print a[1] "#" }' |\
        // awk -vRS="" '{gsub("\n"," ");print}'| awk -vRS="" '{gsub("#","\n");print}'> a.puml
        }

}
